package com.neuedu.corejava.ch4.practise;

import java.util.Scanner;

public class Demo26 {

	public static void main(String[] args) {
		//从键盘输入班级学员成绩，计算全班学员的平均分
		int[] score=new int[5]; //成绩数组
		int sum=0;  //成绩总和
		Scanner input= new Scanner(System.in);
		System.out.println("请输入5位学员的成绩：");
		
		for(int i=0;i<score.length;i++){
			score[i]=input.nextInt();
			sum=sum+score[i];  //成绩累加
		}
		System.out.println("平均分是：" + (double)sum/score.length);
	}

}
